package homework;

/**
 * @Author Stringzhua
 * @Date 2024/1/14 11:22
 * description:
 */
public class work {
    public static void main(String[] args) {
        short s = 12;//ok
        //s=s-9;//error int-->short 不兼容的类型: 从int转换到short可能会有损失

        byte b = 10;//ok
        //b=b+11;//不兼容的类型: 从int转换到byte可能会有损失
        b = (byte) (b + 11);//ok

        char c = 'a';
        int i = 16;
        float d = .314F;
        double result = c + i + d;

        byte e = 16;
        short m = 14;
        //short n=c+e;//error  不兼容的类型: 从int转换到short可能会有损失
    }
}
